//Granify Android SDK/com.granifyinc.granifysdk/Granify/subscribeGroupAssigned

subscribeGroupAssigned

[androidJvm]\

@JvmStatic

fun subscribeGroupAssigned(handler: (MatchingGroup) -> Unit)

Registers a callback handler to be notified when a matching group has been assigned.

In most cases, the handler implementation is expected to send the group assignment information to your analytics system. This allows for tracking messaging eligibility as a metric across all sessions. A Granify (or similar) matching group is eligible to see messages whereas a Baseline (or similar) group is ineligible.

Expect your handler to be invoked by Granify when a new session is started. No guarantees are made regarding the thread the handler will be invoked on.

Placement

This function can be called at any time, but it is most usefully called prior to activateGranify to ensure a handler is registered in advance of the group assignment taking place.

Usage

The group that your handler receives when invoked is the exact group that should be reported in your analytics. IMPORTANT: ABSOLUTELY NO CHANGES ARE ALLOWED TO BE PERFORMED ON THE GROUP WHEN REPORTING IN YOUR ANALYTICS.

Parameters

androidJvm

   
handler The callback to be invoked when a group assignment has taken place. A MatchingGroup will be supplied indicating the group the shopper was assigned to for the session.